package service

import "dy/internal/api/store"

type Service interface {
	Comment() CommentSrv
	Favorite() FavoriteSrv
	Video() VideoSrv
	Message() MessageSrv
	Relation() RelationSrv
	User() UserSrv
}

type service struct {
	store store.Factory
}

func (s *service) Comment() CommentSrv {
	return NewCommentService(s)
}

func (s *service) Favorite() FavoriteSrv {
	return NewFavoriteService(s)
}

func (s *service) Video() VideoSrv {
	return NewVideoService(s)
}

func (s *service) Message() MessageSrv {
	return NewMessageService(s)
}

func (s *service) Relation() RelationSrv {
	return NewRelationService(s)
}

func (s *service) User() UserSrv {
	return NewUserService(s)
}

func NewService(store store.Factory) Service {
	return &service{
		store: store,
	}
}
